<?php

namespace App\Models;

use App\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Antiepidemic extends Model
{
    use HasFactory, softDeletes, HasDateTimeFormatter;

    protected $table = 'antiepidemic';

    protected $fillable = [
        'studentName',
        'studentSex',
        'school',
        'grade',
        'parentName',
        'phone',
        'address',
        'healthCodeList',
        'tourCodeList',
        'identityList',
        'category_id'
    ];

    public function category()
    {
        return $this->belongsTo(Category::class);
    }
}
